package micro.web.client;

import micro.data.model.User;
import micro.web.config.FeignConfig;
import micro.web.fallback.UserFallBack;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * @author txw
 * @version V1.0
 * @Title: UserFeignClient
 * @ProjectName micro-email-server
 * @Description: 描述
 * @since 2018/6/21 1:04
 */
@FeignClient(name = "micro-user-server",configuration = FeignConfig.class,fallback =UserFallBack.class)
public interface UserFeignClient {
    /**
     * 查询用户
     * @param id
     * @return
     */
    @RequestMapping(value = "/micro/user/getId/{id}", method = RequestMethod.GET)
    User findById(@PathVariable("id") Long id);
}
